<?php
require '../../../zb_system/function/c_system_base.php';

require '../../../zb_system/function/c_system_admin.php';

$zbp->Load();

$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}

if (!$zbp->CheckPlugin('Regtas')) {$zbp->ShowError(48);die();}

$blogtitle='读者墙（月榜）';

if(count($_POST)>0){

	$zbp->Config('Regtas')->open_reg=$_POST['open_reg'];	
	$zbp->Config('Regtas')->readme_text=$_POST['readme_text'];
	$zbp->Config('Regtas')->title_text=$_POST['title_text'];
	$zbp->Config('Regtas')->dz_gs=$_POST['dz_gs'];	
	$zbp->Config('Regtas')->dz_ts=$_POST['dz_ts'];
	$zbp->SaveConfig('Regtas');
		if(GetVars('addnavbar')){
		$zbp->AddItemToNavbar('item','Regtas',$zbp->Config('Regtas')->title_text,$zbp->host.'?ReaderWall');
	}else{
		$zbp->DelItemToNavbar('item','Regtas');
	}
	
	$zbp->SetHint('good');
	Redirect('./main.php');
}


require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';

?>
<div id="divMain">

  <div class="divHeader"><?php echo $blogtitle;?></div>
<div class="SubMenu"></div>
  <div id="divMain2">
	<form id="edit" name="edit" method="post" action="#">
<input id="reset" name="reset" type="hidden" value="" />
<table border="1" class="tableFull tableBorder">
<tr>
	<td class="td30"><p align='left'><b>你的邮箱</b></p></td>
	<td><input type="text"  name="open_reg" value="<?php echo $zbp->Config('Regtas')->open_reg;?>" />*读者墙将屏蔽这个邮箱</td>
</tr>
	<td class="td30"><p align='left'><b>将读者墙链接加入导航栏</b></p></td>
	<td><input type="checkbox" name="addnavbar" value="ok" <?php if($zbp->CheckItemToNavbar('item','Regtas')){?>checked="checked"<?php }?> /></td>
</tr>
<tr>
	<td class="td30"><p align='left'><b>读者墙页面标题</b></p></td>
	<td><input type="text" name="title_text" value="<?php echo htmlspecialchars($zbp->Config('Regtas')->title_text);?>" style="width:89%;" /></td>
</tr>
<tr>
	<td class="td30"><p align='left'><b>读者墙相关说明文字</b></p></td>
	<td><textarea name="readme_text" style="width:90%;height:100px;" /><?php echo htmlspecialchars($zbp->Config('Regtas')->readme_text);?></textarea></td>
</tr>
<tr>
	<td class="td30"><p align='left'><b>读者墙读者显示个数</b></p></td>
	<td>
    <input type="number" name="dz_gs" min="1" max="200" value="<?php echo htmlspecialchars($zbp->Config('Regtas')->dz_gs);?>" /></td>
</tr>
<tr>
	<td class="td30"><p align='left'><b>显示N天内的排名</b></p></td>
	<td>
    <input type="number" name="dz_ts" min="1" max="2000" value="<?php echo htmlspecialchars($zbp->Config('Regtas')->dz_ts);?>" /></td>
</tr>
</table>

	  <hr/>
	  <p>
		<input type="submit" class="button" value="<?php echo $lang['msg']['submit']?>" />

	</form>
    使用说明：<br>
1、发现任何问题可以留言给作者，请勿给差评。<br>
2、请认真阅读第一条。<br>
3、请再次阅读第一条。<br>
4、读者墙相关说明文字，这个在读者墙列表上面显示<br>
5、邮箱是为了过滤作者的留言，防止作者自己上墙。<br>
6、读者墙读者显示个数,只能是数字。
	<script type="text/javascript">ActiveLeftMenu("aPluginMng");</script>
	<script type="text/javascript">AddHeaderIcon("<?php echo $bloghost . 'zb_users/plugin/Regtas/logo.png';?>");</script>	
  </div>
</div>


<?php
require $blogpath . 'zb_system/admin/admin_footer.php';

RunTime();
?>